The core of implementing an effect component is implementing the EffectBegin and EffectRenderFrame functions. Together, these functions handle the rendering of a single frame of the effect.
The EffectBegin function is called immediately before each frame is to be rendered. It is guaranteed that this function is never called from an interrupt, so it is safe to perform actions that could move memory within this function. In general, the EffectBegin function should set up the internal state of your component so it has all the information it needs to render a single frame.
The EffectRenderFrame function is called to actually render the frame. This can be called at interrupt time, so it is not safe to move or allocate memory in this function. You should also take care not to call functions that would do so. Your EffectRenderFrame function should actually render a single frame of your effect.
| Previous | Chapter Contents | Chapter Top | Next |